﻿using System;
using System.Data;
using KPIS.GERP.GFMS.MODEL;
using System.Collections.Generic;

namespace KPIS.GERP.GFMS.IBLL
{
    public interface IBLL_FIM_MoneyRequests
    {
        IList<M_FIM_MoneyRequests> GetFull(string bgm_source_seq
            , string bgm_year, string work_area_seq, string event_seq
            , string contact_seq, string emp_seq, string record_status, bool bReadyToPay);
        IList<M_FIM_MoneyRequests> GetReturnDate(string bgm_source_seq
            , string bgm_year, string work_area_seq, string event_seq
            , string contact_seq, string emp_seq, string record_status, DateTime? dFromDate, DateTime? dToDate, bool bReadyToPay);
        IList<M_FIM_MoneyRequests> GetList(string bgm_source_seq
            , string bgm_year, string work_area_seq, string event_seq
            , string contact_seq, string emp_seq, string filter);
        IList<M_FIM_MoneyRequests> GetPetitionList(string bgm_source_seq
            , string bgm_year, string work_area_seq, string event_seq
            , string contact_seq, string emp_seq, string filter);
        IList<M_FIM_MoneyRequests> GetNotPetition(string bgm_source_seq
            , string bgm_year, string petition_seq, string bgm_exp_grp_seq);
        IList<M_FIM_MoneyRequests> GetNotReturnList(string return_seq
            , string emp_seq, string contact_person_seq);
        M_FIM_MoneyRequests GetNotReturnInfo(string money_req_seq, string return_seq);
        M_FIM_MoneyRequests GetInfo(string seq);
        M_FIM_MoneyRequests GetInfo(string seq, string receive_seq);
        M_FIM_MoneyRequests GetDnDeductInfo(string seq);
        IList<M_HRM_PR_PayrollDtls> GetSalaryDeductList(string money_req_seq);
        M_FIM_MoneyRequests GetMoneyReqDNInfo(string seq);
        bool HaveAmountExist(string money_req_seq);
        //string SelectRecentInsertedRoleSeq();

        string Insert(M_FIM_MoneyRequests info);
        void Update(M_FIM_MoneyRequests info);
        void Delete(M_FIM_MoneyRequests info);
        void UpdateBidder(M_FIM_MoneyRequests info);
        void UpdateBgmExpGrpSeq(M_FIM_MoneyRequests info);
        void UpdateGlTranSeq(M_FIM_MoneyRequests info);
        bool UpdateBorrowAllow(M_FIM_MoneyRequests info);
        void UpdateBorrowReturnDate(int money_req_seq, DateTime real_pay_date);
        void UpdateUseAdvance(string money_req_seq, string use_advance, string remarks, string updated_by);
        bool ChangeStatus(M_FIM_MoneyRequests info);
        bool ChangeStatus(M_FIM_MoneyRequests info, out string problemMessage);
        bool HaveAmountExist(int money_req_seq);

        DataTable Report_Contract(string seq);
        DataTable Report_ContractSub(string seq);

        string GetNextRefNo(string bgm_year, string bgm_source_seq);
        string GetNextBorrowNo(string bgm_year, string bgm_source_seq, string use_advance);
    }
}
